<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" href="../../../../layuiadmin/layui/css/layui.css" media="all">
		<link rel="stylesheet" href="../../../../layuiadmin/style/admin.css" media="all">
		<link rel="stylesheet" href="../../../../css/common.css" media="all">

		<style type="text/css">
			.show_img_ul {
				display: flex;
				flex-wrap: wrap;
				align-items: center;
				margin-top: 10px;
			}
			
			.show_img_li {
				text-align: center;
				padding: 10px;
			}
			
			.show_img_li p,
			.show_img_li1 p {
				text-align: center;
				cursor: pointer;
			}
			
			.show_img_li img {
				width: 120px;
				height: 120px;
				margin-bottom: 8px;
			}
			
			.show_img_li1 img {
				width: 300px;
				height: 200px;
				margin-bottom: 8px;
			}
			
			.layui-upload-img {
				width: 92px;
				height: 92px;
				margin: 0 10px 10px 0;
			}
		</style>
	</head>

	<body>

		<div class="layui-fluid">
			<div class="layui-row" id="view">
				<form class="layui-form" lay-filter="test_detail">
					<div class="layui-card">
						<div class="layui-card-body">
							<div class="layui-form-item">
								<label class="layui-form-label">状态：<span style="color: red;">*</span></label>
								<div class="layui-input-inline ">
									<input type="radio" name="status" value='0' title='未读'>
									<input type="radio" name="status" value='1' title='已读'>
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">会员编号：<span style="color: red;">*</span></label>
								<div class="layui-input-inline">
									<input type="text" name="memberid" placeholder="会员编号" autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">会员名：<span style="color: red;">*</span></label>
								<div class="layui-input-inline">
									<input type="text" name="name" placeholder="会员名" autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">手机：<span style="color: red;">*</span></label>
								<div class="layui-input-inline">
									<input type="text" name="mobile" placeholder="手机" autocomplete="off" class="layui-input">
								</div>
							</div>
							
							<div class="layui-form-item">
								<label class="layui-form-label">反馈内容：<span style="color: red;">*</span></label>
								<div class="layui-input-inline">									
									<textarea  name="content" placeholder="反馈内容" cols="30" rows="10"></textarea>
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">提交时间：<span style="color: red;">*</span></label>
								<div class="layui-input-inline">
									<input type="text" name="addtime" placeholder="提交时间" autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-form-item layui-layout-admin">
								<div class="layui-input-block">
									<div class="layui-footer" style="left: 0;">
										<button class="layui-btn" lay-submit="" lay-filter="demo1">关闭</button>
									</div>
								</div>
							</div>
						</div>
					</div>
				</form>
			</div>
		</div>
		<script src="../../../../layuiadmin/layui/layui.js"></script>
		<script src="../../../../js/jquery.min.js"></script>
		<script src="../../../../js/jquery.jqprint-0.3.js"></script>
		<script src="../../../../js/ace/ace.js"></script>
		<script src="../../../../js/common.js"></script>
		<script>
			var _data = {
				id: getParam('id')
			}
			layui.config({
				base: '../../../../layuiadmin/' //静态资源所在路径
			}).extend({
				tinymce: '../tinymce/tinymce', //主入口模块
				index: 'lib/index' //主入口模块
			}).use(['index', 'form', 'laytpl', 'laydate', 'layedit', 'upload', 'uploadnew', 'tinymce'], function() {
				var $ = layui.$,
					admin = layui.admin,
					upload = layui.upload,
					laytpl = layui.laytpl,
					laydate = layui.laydate,
					layedit = layui.layedit,
					uploadnew = layui.uploadnew,
					tinymce = layui.tinymce,
					form = layui.form;

				if(_data.id) {
					initdata();
				}
				layedit.set({});
				var indexbuild = layedit.build('demo_editor1'); //建立编辑器
				laydate.render({
					elem: '#starttime',
					type: 'datetime'
				});
				laydate.render({
					elem: '#endtime',
					type: 'datetime'
				});
				//监听提交
				form.on('submit(demo1)', function(data) {
					var data = data.field.status;
					//Object.assign(_data, data)
					_data.status = data; 
					if(_data.id) {
						submitdata(server.site_feedback_edit);
					} else {
						console.log(_data)
						//submitdata(server.fee_packet_insert);
					}
					return false;
				});

				function submitdata(_url) {
					$.post(_url, _data, function(res, status) {
						if(status == 'success') {
							if(res.code == 0) {
								layer.alert('操作成功', function() {
									parent.layer.closeAll();
									parent.layui.table.reload('test-table-operate');
								});
							} else {
								layer.msg(res.msg);
							}
							closeloading();
						} else {
							closeloading();
							layer.msg('服务器连接错误');
						}
					});
				}

				function initdata() {
					$.get(server.site_feedback_detail, _data, function(res, status) {
						if(status == 'success') {
							if(res.code == 0) {
								var data = res.site_feedback
								form.val("test_detail", data.data);
								form.render();
							} else {
								layer.msg(res.msg);
							}
						} else {
							layer.msg('服务器连接错误');
						}
					});
				}
			});
		</script>
	</body>

</html>